import request from '@/utils/request'
import type { ShopInfoResult } from './types'

/** 进入店铺接口 */
class APIStoreHome {
    /** 进入店铺--获取基本信息 */
    static getShopInfo(shop_id: string) {
        return request<ShopInfoResult>('/getShopInfo', {
            method: 'POST',
            body: { shop_id }
        })
    }

    /** 进入店铺--获取基本信息 */
    static getLoginShopInfo(shop_id: string) {
        return request<ShopInfoResult>('/getLoginShopInfo', {
            method: 'POST',
            body: { shop_id }
        })
    }

    /** 进入店铺--获取底下商品 */
    static getShopGoods(data: any, params: any) {
        return request<any>('/getShopGoods', {
            method: 'POST',
            body: data,
            params
        })
    }

    /** 搜索条件 */
    static getConditionSelect(type: any) {
        return request<any>('/getConditionSelect', {
            method: 'POST',
            body: { type }
        })
    }

    /** 关注店铺 */
    static setUserConcern(Invite_code: string) {
        return request<any>('/setUserConcern', {
            method: 'POST',
            body: { Invite_code }
        })
    }

    /** 取消关注店铺 */
    static cancelUserConcern(Invite_code: string) {
        return request<any>('/cancelUserConcern', {
            method: 'POST',
            body: { Invite_code }
        })
    }


}

export default APIStoreHome
